import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import Login from '@/views/Login.vue'
import Layout from '../views/layout/Layout.vue';


//const About = () => import('../views/AboutView.vue');

Vue.use(VueRouter)


const routes = [
  {
    path: '/',
    name: 'layout',
    component: Layout,
    children:[
      {
        path: '/',
        name: 'home',
        component: HomeView
      },
      
  {
    path: '/about',
    name: 'about',
    component: () => import('../views/AboutView.vue')
  },
    ]
  },
      
  {
    path: '/login',
    name: 'login',
    component: Login
  }
  
]

const router = new VueRouter({
  routes
})

export default router
